# 测试配置
find_package(GTest REQUIRED)
find_package(nlohmann_json REQUIRED)

# 添加测试可执行文件
add_executable(core_test core_test.cpp)
target_include_directories(core_test PRIVATE ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(core_test 
    GTest::GTest 
    GTest::Main 
    klippy_cpp
    nlohmann_json::nlohmann_json
)

# 添加reactor测试
add_executable(reactor_test reactor_test.cpp)
target_include_directories(reactor_test PRIVATE ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(reactor_test
    GTest::GTest
    GTest::Main
    klippy_cpp
    pthread
)

# 注册测试
gtest_discover_tests(core_test)
gtest_discover_tests(reactor_test)